• Description:
    From 0.17 You are allowed to use inlined assembler also in PowerPC code. It can be usefull for disassembler output etc. It currently doesn't support all of the simplified mnemonics and several of supervisor instructions aren't allowed. Please use it with care. You can also use normal PowerD comments.

  • Syntax:
      ASM
        here should be your assembler routines
      ENDASM
    
      APROC compute(r3:L,r4:L,r5:L)(L)
        here should be your assembler routines
      ENDPROC
    
  • Known PowerPC instructions:
    add      add.     addo     addo.    addc     addc.    addco    addco.
    adde     adde.    addeo    addeo.   addi     addic    addic.   addis
    addme    addme.   addmeo   addmeo.  addze    addze.   addzeo   addzeo.
    and      and.     andc     andc.    andi     andis    andi.    andis.
    b        ba       bl       bla      bc       bca      bcl      bcla
    bcctr    bcctrl   bclr     bclrl    clrlwi   clrlslwi clrrwi   cmp
    cmpi     cmpl     cmpli    cmpw     cmpwi    cmplw    cmplwi   cntlzw
    cntlzw.  crand    crandc   crclr    creqv    crmove   crnand   crnor
    crnot    cror     crorc    crset    crxor    dcba     dcbf     dcbi
    dcbst    dcbt     dcbtst   dcbz     divw     divw.    divwo    divwo.
    divwu    divwu.   divwuo   divwuo.  eciwx    ecowx    eieio    eqv
    extlwi   extrwi   extsb    extsb.   extsh    extsh.   fabs     fabs.
    fadd     fadd.    fadds    fadds.   fcmpo    fcmpu    fctiw    fctiw.
    fctiwz   fctiwz.  fdiv     fdiv.    fdivs    fdivs.   fmadd    fmadd.
    fmadds   fmadds.  fmr      fmr.     fmsub    fmsub.   fmsubs   fmsubs.
    fmul     fmul.    fmuls    fmuls.   fnabs    fnabs.   fneg     fneg.
    fnmadd   fnmadd.  fnmadds  fnmadds. fnmsub   fnmsub.  fnmsubs  fnmsubs.
    fres     fres.    frsp     frsp.    frsqrte  frsqrte. fsel     fsel.
    fsub     fsub.    fsubs    fsubs.   icbi     inslwi   insrwi   isync
    la       lb       lbz      lbzu     lbzux    lbzx     lf       lfd
    lfdu     lfdux    lfdx     ls       lfs      lfsu     lfsux    lfsx
    lh       lha      lhau     lhaux    lhax     lhbrx    lhz      lhzu
    lhzux    lhzx     li       lis      lmw      lswi     lswx     lw
    lwarx    lwbrx    lwz      lwzu     lwzux    lwzx     mcrf     mcrfs
    mcrxr    mfcr     mfctr    mffs     mffs.    mflr     mfspr    mfxer
    mr       mr.      mtcr     mtcrf    mtctr    mtfsb0   mtfsb0.  mtfsb1
    mtfsb1.  mtfsf    mtfsf.   mtfsfi   mtfsfi.  mtlr     mtspr    mtxer
    mulhw    mulhw.   mulhwu   mulhwu.  mulli    mullw    mullw.   mullwo
    mullwo.  nand     nand.    neg      neg.     nego     nego.    nop
    nor      nor.     not      or       or.      orc      orc.     ori
    oris     rlwimi   rlwimi.  rlwinm   rlwinm.  rlwnm    rlwnm.   rotlw
    rotlwi   rotrwi   sc       slw      slw.     slwi     srwi     sraw
    sraw.    srawi    srawi.   srw      srw.     sb       stb      stbu
    stbux    stbx     sf       stfd     stfdu    stfdux   stfdx    stfiwx
    ss       stfs     stfsu    stfsux   stfsx    sh       sth      sthbrx
    sthu     sthux    sthx     stmw     stswi    stswx    sw       stw
    stwbrx   stwcx.   stwu     stwux    stwx     subf     subf.    subfo
    subfo.   subfc    subfc.   subfco   subfco.  subfe    subfe.   subfeo
    subfeo.  subfic   subfme   subfme.  subfmeo  subfmeo. subfze   subfze.
    subfzeo  subfzeo. subi     subic    subic.   subis    sync     tw
    twi      xor      xor.     xori     xoris
    
  • Special mnemonics to access PowerD variables:
    Following instructions allows You to access normal variables.
    sb, sh, sw, sf, ss: to store byte, halfword, word, float double, float single
    lb, lh, lw, lf, ls: to load  byte, halfword, word, float double, float single
    la:                 to obtain the address of the variable
    

    The instruction format is:
      <instruction> rx,var
    

    To get more information, check 'The Programming Environments for 32-Bit Microprocessors' from Motorola.